'use strict';

module.exports = app => {
  const { router, controller } = app;

  // 创建博客
  router.post('/api/blog/createBlog', app.middleware.blogvalidate(), controller.blog.createBlog);
  // return router;
  // 个人空间加载更多
  router.get('/api/blog/loadProfileMore/:userName/:pageIndex', app.middleware.loginChecks.loginCheck, controller.blog.loadProfileMore);
  // 广场加载更多
  router.get('/api/blog/loadSquareMore/:pageIndex', app.middleware.loginChecks.loginCheck, controller.blog.loadSquareMore);
  // 首页的加载更多
  router.get('/api/blog/loadHomeBlogMore/:pageIndex', app.middleware.loginChecks.loginCheck, controller.blog.loadHomeBlogMore);
  // atMe的加载更多
  router.get('/api/blog/loadAtMeBlogMore/:pageIndex', app.middleware.loginChecks.loginCheck, controller.blog.loadAtMeBlogMore);

};
